package com.javasm.dao;

import com.javasm.entity.AdminUser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * 后台用户(AdminUser)表数据库访问层
 *
 * @author makejava
 * @since 2025-06-19 15:31:32
 */
public interface AdminUserDao {

    //根据用户名查用户信息
    AdminUser  getUserByName(String username);

    //更新最后登录时间
    Integer updateUserLoginTime(Long uid);

    //查询用户的url列表
    List<String> listUserUrl(Long uid);


    //查询分段记录
    List<AdminUser> listUser(@Param("inputUser") AdminUser inputUser,@Param("startIdx")Integer startIdx,@Param("pageSize")Integer pageSize);

    //统计总记录数
    Integer countUser(@Param("inputUser") AdminUser inputUser);

    //添加用户
    Integer insertUser(@Param("inputUser") AdminUser inputUser);

    //修改用户
    Integer updateUser(@Param("inputUser") AdminUser inputUser);

    //删除用户
    Integer deleteUser(@Param("listUid")List<Long> listUid);

    //删除用户的菜单信息
    Integer deleteUserMenu(Long uid);

    //添加用户的菜单信息
    Integer insertUserMenu(@Param("listMid")List<Long> listMid,@Param("uid")Long uid);


}

